import { createRouter, createWebHashHistory  } from 'vue-router'
import Home from '../views/home/Home.vue'

const routes = [
  {
    path: '/',
    redirect:{
      name:'home'
    }
  },
  {
    path: '/home',
    name: 'home',
    component: Home,
    meta:{
      isShowFoot:true,
    },
    children:[
      {
        path: 'amap',
        name: 'amap',
        component: () => import( '../views/homecompoun/Amap.vue'),
        meta:{
          isShowFoot:false,
        },
      }
    ]
  },
  {
    path: '/home/map',
    name: 'map',
    component: () => import( '../views/homecompoun/Amap.vue'),
    meta:{
      isShowFoot:false,
    },
  },
  {
    path: '/topic',
    name: 'topic',
    component: () => import( '../views/topic/index.vue'),
    meta:{
      isShowFoot:true,
    }
  },
  {
    path: '/category',
    name: 'category',
    component: () => import( '../views/category/index.vue'),
    meta:{
      isShowFoot:true,
    }
  },
  {
    path: '/car',
    name: 'car',
    component: () => import( '../views/car/index.vue'),
    meta:{
      isShowFoot:true,
    }
  },
  {
    path: '/my',
    name: 'my',
    component: () => import( '../views/my/index.vue'),
    meta:{
      isShowFoot:true,
    }
  },
]

const router = createRouter({
  history: createWebHashHistory (process.env.BASE_URL),
  routes
})

export default router
